package com.xuan.mail.service;

import com.xuan.mail.domin.Attachment;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
* @author 86156
* @description 针对表【attachment】的数据库操作Service
* @createDate 2024-03-15 14:20:38
*/
public interface AttachmentService extends IService<Attachment> {
    //文件上传服务
    public Attachment upload(Integer emailId,MultipartFile file) throws IOException;

    //文件下载服务
    void download(Integer attachmentId, HttpServletResponse response)throws IOException;

    List<Attachment> list(Integer emailId);

    void delete(Integer id);
}
